﻿using Eleven_Threety_RK.DAL;
using Eleven_Threety_RK.Model;
using MD5Hash;

namespace Eleven_Threety_RK.BLL
{
    public class UserBll
    {
        private readonly UserDal userDal;

        public UserBll(UserDal _userDal)
        {
            userDal = _userDal;
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="G"></param>
        /// <returns></returns>
        public int UserAdd(UserInfo G)
        {
            try
            {
                return userDal.UserAdd(G);
            }
            catch (Exception)
            {

                throw;
            }
        }
        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="UserName"></param>
        /// <param name="Password"></param>
        /// <returns></returns>
        public dynamic UserLog(string UserName, string Password)
        {
            try
            {
                return userDal.UserLog(UserName, Password);
            }
            catch (Exception)
            {

                throw;
            }
        }
    }
}